package com.wwg.cms.service.impl;

import java.util.Collection;
import com.wwg.cms.bo.*;
import com.wwg.cms.service.*;
import com.css.framework.dao.GeneralDao;

import com.wwg.cms.bo.entity.*;

/**
 * 
 * create by wwl
 * 常量表
 * @author wwl
 */
public class UserExtPropServiceImpl implements UserExtPropService{

    private GeneralDao generalDao;
      
    public void setGeneralDao(GeneralDao generalDao) {
	        this.generalDao = generalDao;
	}
    
   
    
    /**
	 *获取所有常量表
	 */
	public Collection getUserExtPropList(){
     String hsql="select ent from UserExtPropEntity as ent ";
     return generalDao.find(hsql);
    
    }
	
	/**
	 * 添加常量表
	 * @param userextprop 常量表
	 * @return
	 */
	public UserExtProp addUserExtProp(UserExtProp userextprop){
   
			generalDao.save(userextprop);
		    
    return userextprop;
    
    }
	
	/**
	 * 修改常量表
	 * @param userextprop 常量表
	 * @return
	 */
	public  UserExtProp updateUserExtProp(UserExtProp userextprop){
    
            generalDao.saveOrUpdate(userextprop); 
	
        
        return userextprop;
    }
	
	/**
	 * 删除常量表
	 * @param userextprop 常量表
	 * @return
	 */
	public UserExtProp deleteUserExtProp(UserExtProp userextprop){
      		generalDao.delete(userextprop);
		
        return userextprop;
    }
    
    /**
     *  获取常量表 by id
     *  @param id 编号
     * @return
	 */
    public UserExtProp getUserExtPropById(Long id){
    
   
     return (UserExtProp)generalDao.fetch(id,UserExtPropEntity.class);
    
    }
    
}
